<?php

use Drupal\s_announcement\Entity\SAnnouncement;

function s_announcement_s_announcement_add_page() {
  $e = new SAnnouncement();
  module_load_include('inc', 's_announcement', 's_announcement.forms');
  return drupal_get_form('s_announcement_s_announcement_entity_form', $e, 'add');
}

function s_announcement_s_announcement_view_page(SAnnouncement $e) {
  return entity_view($e->entityType(), [$e]);
}

function s_announcement_s_announcement_edit_page(SAnnouncement $e) {
  module_load_include('inc', 's_announcement', 's_announcement.forms');
  return drupal_get_form('s_announcement_s_announcement_entity_form', $e, 'edit');
}

function s_announcement_s_announcement_delete_page(SAnnouncement $e) {
  module_load_include('inc', 's_announcement', 's_announcement.forms');
  return drupal_get_form('s_announcement_s_announcement_delete_form', $e);
}

